Auto merge of #3849 - alexcrichton:fix-stack-overflow, r=matklad
authorbors <bors@rust-lang.org>
Mon, 20 Mar 2017 20:39:33 +0000 (20:39 +0000)
committerbors <bors@rust-lang.org>
Mon, 20 Mar 2017 20:39:33 +0000 (20:39 +0000)
Detect cyclic dependencies through [replace]

Previously this'd cause a stack overflow in Cargo later in the compilation
graph, but this is intended to get caught during resolution.

Closes #3831


Trivial merge